import Vue from 'vue'
import VueRouter from 'vue-router'
import CenterIndex from '../views/mycenter/IndexView.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'center',
    component: CenterIndex,
    children:[
      {
        path: '/center/myinfo',
        name: 'center/myinfo',
        component: () => import( '../views/mycenter/MyInfoView.vue')
      },
      {
        path: '/center/myorder',
        name: 'center/myinfo',
        component: () => import( '../views/mycenter/MyOrderView.vue')
      },
      {
        path: '/center/myaddress',
        name: 'center/myinfo',
        component: () => import( '../views/mycenter/MyAddressView.vue')
      },
    ]
  },
  {
    path: '/center/login',
    name: 'center/login',
    component: () => import('../views/mycenter/LoginView.vue')
  },
  {
    path: '/goods/list',
    name: 'goods/list',
    component: () => import('../views/goods/ListView.vue')
  },
  
  {
    path: '/goods/detail',
    name: 'goods/detail',
    component: () => import('../views/goods/DetailView.vue')
  },
  {
    path: '/car/list',
    name: 'car/list',
    component: () => import('../views/car/ListView.vue')
  },
  {
    path: '/car/account',
    name: 'car/account',
    component: () => import('../views/car/AccountView.vue')
  }
]

const router = new VueRouter({
  routes
})

export default router
